package com.ihr360.payroll.dao;

import com.ihr360.payroll.model.dto.salary.meta.PayrollConfig;
import com.ihr360.rest.reposity.SimpleRestReposity;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

@RepositoryRestResource
public interface PayrollConfigRepository extends SimpleRestReposity<PayrollConfig, Long> {
    List<PayrollConfig> findByCompanyId(String companyId);
    List<PayrollConfig> findByIsSystemTemplate(boolean isSystemTemplate);
    long countByCompanyIdAndIdNotAndName(String companyId, Long id, String name);
    long countByIsSystemTemplateAndIdNotAndName(boolean isSystemTemplate, Long id, String name);
    long countByCompanyIdAndName(String companyId,String name);
    long countByIsSystemTemplateAndName(boolean isSystemTemplate, String name);

}